package org.jeecg.modules.demo.jxcx.controller;

import com.alibaba.fastjson.JSONObject;
import org.jeecg.modules.demo.jxcx.Utils.R;
import org.jeecg.modules.demo.jxcx.service.JxcNoticeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping({"jxcNotice"})
public class JxcNoticeController {
    private static Logger logger = LoggerFactory.getLogger(JxcNoticeController.class);

    @Resource
    private JxcNoticeService jxcNoticeService;
    @PostMapping("getinfor")
    public R getinfor(@RequestBody JSONObject params) {
        String infor = jxcNoticeService.getByType(params.getString("type"));
        return new R().ok(infor);
    }
}
